import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqStringHelper } from "../Public/SeqStringHelper";
import { SPublicMiniPlayer } from "../Public/SPublicMiniPlayer";
type int = number;
//class SOneKeyApplyMsg
    
    export  class SOneKeyApplyMsg extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SOneKeyApplyMsg();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            this.fromPlayer.__write(arg1);
            SeqStringHelper.write(arg1, this.toPlayerNames);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.fromPlayer = new SPublicMiniPlayer();
            this.fromPlayer.__read(arg1);
            this.toPlayerNames = SeqStringHelper.read(arg1);
            return;
        }

        public /* const */_type: int=12323;

        public /* var */fromPlayer: SPublicMiniPlayer;

        public /* var */toPlayerNames: Array<any>;

        public static /* var */_regist: SOneKeyApplyMsg;
    }

            SOneKeyApplyMsg._regist = new SOneKeyApplyMsg(true);
        